
// 获取应用实例
const app = getApp()

Page({
  data: 
  {
    item_title:["电脑","家电","家居","教育","手机","图书","玩具","鞋子","衣服","钟表"],
    item_src:["/导航栏/电脑.png","/导航栏/家电.png","/导航栏/家居.png","/导航栏/教育.png","/导航栏/手机.png","/导航栏/图书.png","/导航栏/玩具.png","/导航栏/鞋子.png","/导航栏/衣服.png","/导航栏/钟表.png",],
    product_name:["华为mate30","黑鲨pro","小米10","oppo11","vivo24","洛基亚3代","金狮子","玫瑰","月季花","梅花","牡丹","郁金香","美特斯邦威T恤","森马羽绒服","短裙","连衣裙","薯片","儿童棉衣","牛肉干","吹风机","电饭煲","香蕉","水壶"],
    product_price:[3250,2650,4200,2300,1500,270,500,200,130,150,250,150,50,400,50,90,15,60,15,20,100,10,20,42],
    product_src:["/img/images/temp/cate1.jpg","/img/images/temp/cate2.jpg","/img/images/temp/cate3.jpg","/img/images/temp/cate4.jpg","/img/images/temp/cate5.jpg","/img/images/temp/cate6.jpg","/img/images/temp/cate7.jpg","/img/images/temp/cate8.jpg","/img/images/temp/cate9.jpg","/img/images/temp/cate10.jpg","/img/images/temp/cate11.jpg","/img/images/temp/cate12.jpg","/img/images/temp/cate13.jpg","/img/images/temp/cate14.jpg","/img/images/temp/cate15.jpg","/img/images/temp/cate16.jpg","/img/images/temp/cate17.jpg","/img/images/temp/cate18.jpg","/img/images/temp/cate19.jpg","/img/images/temp/cate20.jpg","/img/images/temp/cate21.jpg","/img/images/temp/cate22.jpg","/img/images/temp/cate23.jpg","/img/images/temp/cate24.jpg",],
  },
  getNavList:function(e)
  {
    wx.request
    ({
      url: 'http://391767s18s.wicp.vip/',
      success(res)
      {
        console.log(res.data);
      }
    })
  },
  btn:function(e)
  {
    console.log(123)
  },
  // 事件处理函数
  bindViewTap() 
  {

  },
  clk:function(e)
  {
    wx.showToast({
      title: '没实现，别点啦',
    })
  },
  onLoad: function (options) 
  {
    this.getNavList();
  },
  getUserProfile(e) {
    // 推荐使用wx.getUserProfile获取用户信息，开发者每次通过该接口获取用户个人信息均需用户确认，开发者妥善保管用户快速填写的头像昵称，避免重复弹窗
    wx.getUserProfile({
      desc: '展示用户信息', // 声明获取用户个人信息后的用途，后续会展示在弹窗中，请谨慎填写
      success: (res) => {
        console.log(res)
        this.setData({
          userInfo: res.userInfo,
          hasUserInfo: true
        })
      }
    })
  },
  getUserInfo(e) {
    // 不推荐使用getUserInfo获取用户信息，预计自2021年4月13日起，getUserInfo将不再弹出弹窗，并直接返回匿名的用户个人信息
    console.log(e)
    this.setData({
      userInfo: e.detail.userInfo,
      hasUserInfo: true
    })
  }
})
